The replication folder contains the following files and folders:

"replication_colantone_stanig_2018.do": contains the Stata commands that allow to replicate all the results that replicate and extend Colantone and Stanig (2018)
"replication_chan_et_al_2020.do": contains the Stata commands that allow to replicate all the results in the spirit of Chan et al. (2020)
"replication_mutz_2018.do": contains the Stata commands that allow to replicate all the results that replicate and extend Mutz (2018)
"replication_observational_evidence_ess.do": contains the Stata commands that allow to replicate all the results of the observational study on the effect of exposure to import competition from China on cultural attitudes, that are based on data from ESS
"replication_observational_evidence_evs.do": contains the Stata commands that allow to replicate all the results of the observational study on the effect of exposure to import competition from China on cultural attitudes, that are based on data from EVS

"coefplot.stacked.R": R function that is automatically loaded when running the R commands in "figure1_ess.R" and "figure1_evs.R"
"figure1_ess.R": contains the R code that allows to replicate the part of Figure 1 that is based on data from ESS
"figure1_evs.R": contains the R code that allows to replicate the part of Figure 1 that is based on data from EVS
"LCA_estimation_replication.R": contains the R code that allows to replicate the LCA analysis in the spirit of Chan et al. (2020)
"Simulations_for_Replication_Materials.R": contains the R code to run regressions on artificial data based on the example in the paper

"replication_colantone_stanig_2018.dta": allows to replicate the results based on Colantone and Stanig (2018) that appear in Table 1 and Table 2
"ChanBrexitReplication": a folder containing ancillary files and code needed to merge the China shock data to UKHLS; full instructions in 	"replication_chan_et_al_2020.do"
"replication_mutz_2018.dta": allows to replicate the results based on Nutz (2018) that appear in Table 1 and Table 2
"replication_observational_evidence_ess.dta": allows to replicate the results in Table D.1 and D.3 that are based on data from ESS
"replication_observational_evidence_evs.dta": allows to replicate the results in Table D.2 and D.3 that are based on data from EVS
"figure1_ess.dta" allows to replicate the results in Figure 1 that are based on data from ESS
"figure1_evs.dta" allows to replicate the results in Figure 1 that are based on data from EVS

All code assumes that the working directory is set to the folder containing the replication materials.

You'll need to install the following R packages: haven; foreign; poLCA (this last one is only needed to run "LCA_estimation_replication.R", which is not required to replicate the regression results in the paper.)

The UKHLS data used for the analysis in the spirit of Chan et al.(2020) cannot be redistributed. Detailed instructions on how to obtain the data files needed for replication are found in "replication_chan_et_al_2020.do".